#!/usr/bin/env python

def _(s): return s

import sys, wx
from operations import UserMessage

class Save:
    def __init__(self, mainWin):
        try:
            mainWin.myapache.save_config(mainWin.currentFile)
            mainWin.fileSaved = True
            mainWin.SetStatusText(_("Succesfully saved: %s") % mainWin.currentFile)
        except (OSError, IOError), err:
            UserMessage.say(err, _("Error!"), wx.ICON_ERROR)